package com.demos.cqp.dnt.dao;

import java.sql.Connection;
import java.util.Arrays;
import java.util.List;

import javax.inject.Named;

import com.demos.cqp.dnt.domain.DVD;
import com.demos.cqp.dnt.domain.Utilisateur;
import com.demos.cqp.dnt.domain.DVD.Genre;

@Named("Mock")
public class MockDvdDAO implements DvdthequeDAO{

	Connection connection = null;
	
	
	@Override
	public void enregistrer(DVD dvd, Utilisateur user) throws DAOException {
	}

	@Override
	public List<DVD> rechercher(String titre, Utilisateur user) throws DAOException {
		return Arrays.asList(new DVD[]{
				new DVD("bidon1", "bidon1", new String[]{"bidon","bidon"}, 0, Genre.NON_RENSEIGNE, 0),
				new DVD("bidon2", "bidon2", new String[]{"bidon","bidon"}, 0, Genre.NON_RENSEIGNE, 0),
				new DVD("bidon3", "bidon3", new String[]{"bidon","bidon"}, 0, Genre.NON_RENSEIGNE, 0),
				new DVD("bidon4", "bidon4", new String[]{"bidon","bidon"}, 0, Genre.NON_RENSEIGNE, 0),
				new DVD("bidon5", "bidon5", new String[]{"bidon","bidon"}, 0, Genre.NON_RENSEIGNE, 0)
		});
	}

	@Override
	public DVD consulter(long dvdId) throws DAOException {
		return new DVD("bidon1", "bidon1", new String[]{"bidon","bidon"}, 0, Genre.NON_RENSEIGNE, 0);
	}

	@Override
	public List<DVD> charger(Utilisateur user) throws DAOException {
		return Arrays.asList(new DVD[]{
				new DVD("bidon1", "bidon1", new String[]{"bidon","bidon"}, 0, Genre.NON_RENSEIGNE, 0),
				new DVD("bidon2", "bidon2", new String[]{"bidon","bidon"}, 0, Genre.NON_RENSEIGNE, 0)
		});
	}

	@Override
	public void delete(long idDVD) throws DAOException {
	}

	@Override
	public void mettreAJour(DVD dvd) throws DAOException {
	}

}
